const express = require('express')
const router = express.Router()
const axios = require('axios')
axios.default.timeout= 5000
router.get("/",(req,res)=>{

try{axios.get("http://144.126.242.168:31403/.well-known/stellar-history.json").then(
    async (resq)=>{
        await res.status(200).json(resq.data.currentLedger) 
    }
).catch(
    async(err)=>{
        await res.status(200).json("获取官方数据失败")
    }
)}
catch{
    res.status(200).json("获取软件失败请解决")
}

})
module.exports = router